package adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.example.administrator.text.R;

import java.util.ArrayList;

/**
 * Created by Administrator on 2016/7/1.
 *牛号页ViewPager的适配器
 */
public class VPWeAccount extends BaseAdapter{
    private ArrayList<String> mList;
    private Context mContext;
    private LayoutInflater mInflater;
    public VPWeAccount(Context context,ArrayList<String> list){
        this.mList = list;
        this.mContext = context;
        this.mInflater = LayoutInflater.from(context);
    }

    @Override
    public int getCount() {
        return mList.size();
    }

    @Override
    public Object getItem(int position) {
        return position;
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        View vew = mInflater.inflate(R.layout.adapter_appoint_list, null);
        TextView title = (TextView)vew.findViewById(R.id.tv_appointtime);
        title.setText(mList.get(position));
        return vew;
    }
}
